package com.ruoyi.wlxz.service.impl;

import com.ruoyi.wlxz.mapper.StopWordsMapper;
import com.ruoyi.wlxz.service.StopWordsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Set;
@Service
public class StopWordsImpl implements StopWordsService {
    @Autowired
    private StopWordsMapper stopWordsMapper;

    @Override
    public void addStopWords(String[] words) {
        for (String word : words) {
            stopWordsMapper.insertStopWords(word);
        }
    }

    @Override
    public Set<String> getStopWords() {
        return stopWordsMapper.getStopWords();
    }
}
